package 提前不重复的整数;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    static boolean[] st = new boolean[10];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        String res = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            int j = s.charAt(i) - '0';
            if (!st[j]) {
                st[j] = true;
                res += j;
            }
        }
        System.out.println(Integer.parseInt(res));
    }
}
